// 合并列
/**
 *  dataList Array
 *  mergeField string
 * **/
export const mergeColums = async(dataList, mergeField) => {
  const length = dataList.length;
  if (!length) {
    return [];
  }

  for (let i = 0; i < dataList.length; i++) {
    dataList[i].rowspan = 1;
    for (let j = i + 1; j < dataList.length; j++) {
      if (dataList[i][mergeField] === dataList[j][mergeField]) {
        dataList[i].rowspan++;
        dataList[j].rowspan--;
        console.log(dataList[i], "dataList[i]");
      }
    }
    // 这里跳过已经重复的数据
    i = i + dataList[i].rowspan - 1;
  }
};
